import { request, METHOD } from '@/utils/request';
// 新增事件代码维护
export const getEventMaintenanceApi = (params) => {
  return request('/tool/event/maintenance/list', METHOD.POST, params);
};

// 新增事件代码
export const addEventMaintenanceApi = (params) => {
  return request('/tool/event/maintenance/add', METHOD.POST, params);
};

// 删除事件代码维护
export const delEventMaintenanceApi = ({ id }) => {
  return request(`/tool/event/maintenance/delete/${id}`, METHOD.DELETE);
};

// 获取全局维护列表
export const getStandScoreListApi = (params) => {
  return request('/tool/stand/score/list', METHOD.GET, params);
};

// 修改全局维护
export const standScoreUpdateApi = (params) => {
  return request('/tool/stand/score/update', METHOD.POST, params);
};
// 上传
export const uploadApi = (params) => {
  return request('/tool/event/maintenance/upload', METHOD.POST, params);
};

// 修改
export const updateApi = (params) => {
  return request('/tool/event/maintenance/update', METHOD.POST, params);
};

// 事件代码维护文件上传
export const uploadEventMaintenanceApi = (params) => {
  return request(`/tool/event/maintenance/uploadEventMaintenance?code=${params.code}`, METHOD.POST, params.formData);
};

// 事件文件删除
export const removeFileApi = (params) => {
  return request('/tool/event/maintenance/removeFile', METHOD.GET, params);
};
